Add Seo Friendly Title To WordPress Theme

How To Add SEO Friendly Title To WordPress Theme

When you buy any WordPress theme, do you check whether it is SEO friendly or not? If you’re a web developer or just a blogger then do you know how to add SEO friendly title to WordPress theme?

How can you modify the title so that you don’t need any SEO plugin to make it SEO friendly? Most of the people don’t even think about such concepts and chose the wrong theme.

Before buying a WordPress theme, you should check its SEO friendly features. After installing a theme, you may notice that on the home page of your website, you would want the title as your blog name and the tagline.

Along with that, only the post name should appear when you open any blog post.

Start Editing the header.php file

If you know about the WordPress theme file structure then it won’t be so hard to edit any file from the theme folder. Whether you edit it from the WordPress admin panel or from the cPanel.

And if you’re developing a new theme then just open header.php file and start editing.

In the title tag, you would find a code similar to this.

<title?<?php echo bloginfo(‘name’); ?><?php echo the_title(); ?></title>

This code will show the blog name and the title of the post together. But we want to show the blog name on the homepage/blogpage and the post title on the post page.

It can be done by editing the code using some condition. Just choose a code which would check when a user visits the homepage/blogpage then the blog name with the tagline appear and when he/she opens any post then only the name of the post appears as the title.

Just add the code in the header.php file.

<title><?php if(is_home()) { echo bloginfo(“name”); echo ” | “; echo bloginfo(“description”); } else { echo wp_title(); } ?></title>

Here we have added the condition we wanted. This is the SEO friendly title for your blog. Now you won’t need to depend on any SEO plugin to handle the title of your blog.

Most of the blogger ignores the SEO for their blog. But you shouldn’t. Choose the right WordPress theme which has all the possible features for better SEO.

I Hope You Can Easily Add SEO Friendly Title To WordPress Theme

I have noticed in many WordPress themes, the title is not what we want. People are dependent on the plugin and it’s hard to say which theme is SEO friendly or not.

If you’re a developer then you check the title availability by checking the source code of the theme. You can inspect the header element and check whether the title is SEO friendly or not.

If you’re having a theme with an inappropriate title then use the above-mentioned code and add SEO friendly title to WordPress theme.

by Ravi Chahar

A WordPress Professional and the LinkedIn Influencer. A coder by passion and a blogger by choice. WordPress theme development is his forte. He is your WordPress guy who will teach you how to solve WordPress errors, WordPress security issues, design issues and what not.


Get Free Updates Into Your Inbox

Learn Everything Just Like I Did

SUBSCRIBE



2 comments

  1. Hi Ravi,

    Long time.I’ve been offline for all while now, as you may have noticed.

    You make editing our WordPress files simple.

    And for those of us still educating ourselves in WordPress, posts like this is a helpful resource.

    When I started blogging, I tried grabbing infos like this by heart. The only thing that nearly impeded my progress was it was hard finding simple and concise posts like this.

    That seid, thanks bro.

    Francis

    1. Hey Francis,

      WordPres isn’t so hard to learn about. You can embrace your skills by practicing the codes. And even you won’t need to dwell into code, you can do everything with the use of plugins.

      But if you want to be a developer then WordPres functions can help you. Thanks for stopping by.

      Have an awesome day.

      ~Ravi

Leave a Reply

Your email address will not be published. Required fields are marked *